package com.hackathon2012_03_04.ryokocial;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.Key;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class UserData {
		@PrimaryKey
	    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	    private Key key;
		
		@Persistent
	    private String userName;
		
		@Persistent
	    private String pass;
		
		@Persistent(mappedBy = "id", defaultFetchGroup = "true")
	    private long perentId;

		public Key getKey() {
			return key;
		}

		public void setKey(Key key) {
			this.key = key;
		}

		public String getUserName() {
			return userName;
		}

		public void setUserName(String userName) {
			this.userName = userName;
		}

		public String getPass() {
			return pass;
		}

		public void setPass(String pass) {
			this.pass = pass;
		}
		
		public long getPerentId() {
			return perentId;
		}

		public void setPerentId(long perentId) {
			this.perentId = perentId;
		}

		public UserData(String userName, String pass, long perentId) {
			this.userName = userName;
			this.pass = pass;
			this.perentId = perentId;
		}

}
